package com.wf.classRoomTest;

import java.util.List;
import java.util.Random;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author mpk
 * @since 2024/6/5 14:08:17
 */
public class StreamTest {
    public static void main(String[] args) {

        List<Integer> collect = Stream.generate(() -> new Random().nextInt(10)).distinct()
                .limit(5).collect(Collectors.toList());

        collect.forEach(System.out::println);
    }


}
